package com.cet.designpatterns.iterator;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-09-22 09:34
 **/
public class Client {
    public static void main(String[] args) {

        List<College> collegeList = new ArrayList<>();

        College computerCollege = new ComputerCollege();
        computerCollege.addDepartment("Java工程师", "Java工程师");
        computerCollege.addDepartment("大数据工程师", "大数据工程师");
        computerCollege.addDepartment("前端工程师", "前端工程师");
        computerCollege.addDepartment("信息安全", "信息安全");

        College infoCollege = new InfoCollege();
        infoCollege.addDepartment("网络信息安全", "网络信息安全");
        infoCollege.addDepartment("电子技术", "电子技术");

        collegeList.add(computerCollege);
        collegeList.add(infoCollege);

        OutputImpl output = new OutputImpl(collegeList);
        output.printCollege();
    }
}
